<script setup lang='ts'>
import { provide, ref } from 'vue';
import Father from '../components/16_跨代传值爸爸组件.vue'
const salary = ref(10000)
provide('money', salary)
provide('cost', (n: number) => {
    salary.value -= n
})
</script>

<template>
    <h1>我是爷爷 养老金：{{ salary }}</h1>
    <Father></Father>
</template>

<style scoped></style>